#include <iostream>
#include <string>
#include <list>
#include "model.h"

using namespace std;
/*using std::string;
using std::list;*/

Group::Group(string name, int multiplicity){
	this->name = name;
	this->multiplicity = multiplicity;
}

Category::Category(string label, float probability){
	this->label = label;
	this->probability = probability;
}

CategoricalVariable::CategoricalVariable(string name, list<Category> values){
	this->name = name;
	this->values = values;
}

Model::Model() {
	 cout << "Model::Model()" << endl;
}

void Model::addGroup(string name, int multiplicity) {
	 cout << "Model::addGroup()" << endl;
	 Group g(name, multiplicity);
	 groups.push_back(g);
}
void Model::addCategoricalVariable(string name, string value, float probability) {
	cout << "Model::addCategoricalVariable()" << endl;
	list<Variable>::iterator i;
	for(i=groups.begin(); i != groups.end(); ++i){
		cout << i->name << " ";
		if (i->name == name){
			found = true;
			
		}
	}
	cout << endl;
	CategoricalVariable cv(name, multiplicity);
	
}


ConcreteModelBuilder::ConcreteModelBuilder(){
	_model = new Model();
}

void ConcreteModelBuilder::buildGroup(string name, int multiplicity){
	cout << "ConcreteModelBuilder::buildGroup()" << endl;
	_model->addGroup(name, multiplicity);
}

void ConcreteModelBuilder::buildCategoricalVariable(string name, string value, float probability){
	cout << "ConcreteModelBuilder::buildCategoricalVariable()" << endl;
	_model->addCategoricalVariable(name, value, probability);
}

void ConcreteModelBuilder::buildNumericalVariable(string name, float from, float to, Distribution distribution, float mean, float variance){
	cout << "ConcreteModelBuilder::buildNumericalVariable()" << endl;
}


